Reordering text from unstructured sources to intended reading flow

ABSTRACT

An approach is provided in which a number of sections from a sequence of characters included in a Portable Document Format (PDF) file are identified. Each of the identified sections includes a unique set of coordinate positions. The approach builds links between the sections based on a relative position of each of the sections in relation to the other sections along an axis. The approach repeatedly merges sections based on the links that were built to form increasingly larger sections until a final larger section is generated with the characters appearing in a manner consistent with human reading of the rendered PDF document rather than the placement of the characters found within the original PDF file.

BACKGROUND

Unstructured documents (such as PDFs) are expressed as a series ofstateful graphic drawing operations. These drawing operations dictatewhere particular characters and graphics are placed in the output aswell as metadata regarding such characters and graphics. For example,the drawing operation may be to move the cursor to a particular position(e.g., 100,200), set the font, font size, and font color, and print aparticular character (e.g., “W”, etc.) at that location. Next thedrawing operations might move the cursor to another position (e.g., 100,210) and print another character (e.g., “a”, etc.) at that location.

The order in which these drawing operations occur dictates the orderthat the characters are received as input when the text isprogrammatically extracted from the PDF document. However, the orderthat the characters appear in the PDF document is different from theorder in which the output is read by a reader of the outputted document.Often, the order in which the characters are found in the PDF correspondto the order that the PDF was written and might have little relevance tothe order in which a human reader will actually read the document. Forexample, in PDF document that includes a title that spans the entire topof the page and an article body that appears in three columns, the firstcharacters output may be found in the middle column, followed bycharacters found in the first column, followed by characters found inthe third column, and finally followed by the characters that form thetitle across the top of the page. This divergence between the order thatcharacters appear in the PDF document and the order in which theoutputted document is consumed by a reader causes many challenges forcomputer operations that consume unstructured documents.

BRIEF SUMMARY

According to one embodiment of the present disclosure, an approach isprovided in which a number of sections from a sequence of charactersincluded in a Portable Document Format (PDF) file are identified. Eachof the identified sections includes a unique set of coordinatepositions. The approach builds links between the sections based on arelative position of each of the sections in relation to the othersections along an axis. The approach repeatedly merges sections based onthe links that were built to form increasingly larger sections until afinal larger section is generated with the characters appearing in amanner consistent with human reading of the rendered PDF document ratherthan the placement of the characters found within the original PDF file.

In another embodiment, the approach inputs the final larger section to acorpus that is utilized by a question answering (QA) system. The naturallanguage processing (NLP) performance of the QA system is consequentlyincreased by performing NLP operations on the final larger sectioninstead of the original PDF file.

The foregoing is a summary and thus contains, by necessity,simplifications, generalizations, and omissions of detail; consequently,those skilled in the art will appreciate that the summary isillustrative only and is not intended to be in any way limiting. Otheraspects, inventive features, and advantages of the present disclosure,as defined solely by the claims, will become apparent in thenon-limiting detailed description set forth below.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

The present disclosure may be better understood, and its numerousobjects, features, and advantages made apparent to those skilled in theart by referencing the accompanying drawings, wherein:

FIG. 1 depicts a schematic diagram of one illustrative embodiment of aquestion/answer creation (QA) system in a computer network;

FIG. 2 illustrates an information handling system, more particularly, aprocessor and common components, which is a simplified example of acomputer system capable of performing the computing operations describedherein;

FIG. 3 is an exemplary diagram depicting the relationship between aPortable Document Format (PDF) source and a resulting rendition of thePDF source;

FIG. 4 is an exemplary diagram depicting sections derived from the PDFsource and their respective coordinate positions;

FIG. 5 is an exemplary diagram depicting the first three mergingoperations that merge sections into larger sections based on the readingflow of the rendered PDF document;

FIG. 6 is an exemplary diagram depicting the next three mergingoperations that further merge sections into larger sections based on thereading flow of the rendered PDF document;

FIG. 7 is an exemplary flowchart depicting the last three mergingoperations that further merge sections into increasingly larger sectionswith the final result being a single section where all of the charactersappear in the order that they are likely intended to be read by a humanreader;

FIG. 8 is an exemplary flowchart depicting overall steps performed bythe process that reorders text from unstructured sources, such as PDFs,to a stream of characters coinciding with the intended reading flow ofthe document;

FIG. 9 is an exemplary flowchart depicting steps that extract sectionsfrom a sequence of characters found in the PDF source;

FIG. 10 is an exemplary flowchart depicting steps that build varioustypes of links between the sections;

FIG. 11 is an exemplary flowchart depicting steps that perform specialrules on some sections found in the unstructured source;

FIG. 12 is an exemplary flowchart depicting steps that perform mainrules on sections found in the unstructured source in a top-downfashion;

FIG. 13 is an exemplary flowchart depicting steps that perform mainrules on sections found in the unstructured source in a left-rightfashion; and

FIG. 14 is an exemplary flowchart depicting steps that merge sectionsidentified as being appropriate for merging from either the specialrules, or from one of the sets of main rules.

DETAILED DESCRIPTION

The terminology used herein is for the purpose of describing particularembodiments only and is not intended to be limiting of the disclosure.As used herein, the singular forms “a”, “an” and “the” are intended toinclude the plural forms as well, unless the context clearly indicatesotherwise. It will be further understood that the terms “comprises”and/or “comprising,” when used in this specification, specify thepresence of stated features, integers, steps, operations, elements,and/or components, but do not preclude the presence or addition of oneor more other features, integers, steps, operations, elements,components, and/or groups thereof.

The corresponding structures, materials, acts, and equivalents of allmeans or step plus function elements in the claims below are intended toinclude any structure, material, or act for performing the function incombination with other claimed elements as specifically claimed. Thedescription of the present disclosure has been presented for purposes ofillustration and description, but is not intended to be exhaustive orlimited to the disclosure in the form disclosed. Many modifications andvariations will be apparent to those of ordinary skill in the artwithout departing from the scope and spirit of the disclosure. Theembodiment was chosen and described in order to best explain theprinciples of the disclosure and the practical application, and toenable others of ordinary skill in the art to understand the disclosurefor various embodiments with various modifications as are suited to theparticular use contemplated.

The present invention may be a system, a method, and/or a computerprogram product. The computer program product may include a computerreadable storage medium (or media) having computer readable programinstructions thereon for causing a processor to carry out aspects of thepresent invention.

The computer readable storage medium can be a tangible device that canretain and store instructions for use by an instruction executiondevice. The computer readable storage medium may be, for example, but isnot limited to, an electronic storage device, a magnetic storage device,an optical storage device, an electromagnetic storage device, asemiconductor storage device, or any suitable combination of theforegoing. A non-exhaustive list of more specific examples of thecomputer readable storage medium includes the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a static random access memory (SRAM), a portablecompact disc read-only memory (CD-ROM), a digital versatile disk (DVD),a memory stick, a floppy disk, a mechanically encoded device such aspunch-cards or raised structures in a groove having instructionsrecorded thereon, and any suitable combination of the foregoing. Acomputer readable storage medium, as used herein, is not to be construedas being transitory signals per se, such as radio waves or other freelypropagating electromagnetic waves, electromagnetic waves propagatingthrough a waveguide or other transmission media (e.g., light pulsespassing through a fiber-optic cable), or electrical signals transmittedthrough a wire.

Computer readable program instructions described herein can bedownloaded to respective computing/processing devices from a computerreadable storage medium or to an external computer or external storagedevice via a network, for example, the Internet, a local area network, awide area network and/or a wireless network. The network may comprisecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers. A network adapter card or network interface in eachcomputing/processing device receives computer readable programinstructions from the network and forwards the computer readable programinstructions for storage in a computer readable storage medium withinthe respective computing/processing device.

Computer readable program instructions for carrying out operations ofthe present invention may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, or either source code or object code written in anycombination of one or more programming languages, including an objectoriented programming language such as Smalltalk, C++ or the like, andconventional procedural programming languages, such as the “C”programming language or similar programming languages. The computerreadable program instructions may execute entirely on the user'scomputer, partly on the user's computer, as a stand-alone softwarepackage, partly on the user's computer and partly on a remote computeror entirely on the remote computer or server. In the latter scenario,the remote computer may be connected to the user's computer through anytype of network, including a local area network (LAN) or a wide areanetwork (WAN), or the connection may be made to an external computer(for example, through the Internet using an Internet Service Provider).In some embodiments, electronic circuitry including, for example,programmable logic circuitry, field-programmable gate arrays (FPGA), orprogrammable logic arrays (PLA) may execute the computer readableprogram instructions by utilizing state information of the computerreadable program instructions to personalize the electronic circuitry,in order to perform aspects of the present invention.

Aspects of the present invention are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions.

These computer readable program instructions may be provided to aprocessor of a general purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute via the processor of the computeror other programmable data processing apparatus, create means forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks. These computer readable program instructionsmay also be stored in a computer readable storage medium that can directa computer, a programmable data processing apparatus, and/or otherdevices to function in a particular manner, such that the computerreadable storage medium having instructions stored therein comprises anarticle of manufacture including instructions which implement aspects ofthe function/act specified in the flowchart and/or block diagram blockor blocks.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the block may occur out of theorder noted in the figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts or carry out combinations of special purpose hardwareand computer instructions. The following detailed description willgenerally follow the summary of the disclosure, as set forth above,further explaining and expanding the definitions of the various aspectsand embodiments of the disclosure as necessary.

FIG. 1 depicts a schematic diagram of one illustrative embodiment of aquestion/answer (QA) system 100 in a computer network 102. QA system 100may include knowledge manager 104, which comprises one or moreprocessors and one or more memories, and potentially any other computingdevice elements generally known in the art including buses, storagedevices, communication interfaces, and the like. Computer network 102may include other computing devices in communication with each other andwith other devices or components via one or more wired and/or wirelessdata communication links, where each communication link may comprise oneor more of wires, routers, switches, transmitters, receivers, or thelike. QA system 100 and network 102 may enable question/answer (QA)generation functionality for one or more content users. Otherembodiments may include QA system 100 interacting with components,systems, sub-systems, and/or devices other than those depicted herein.

QA system 100 may receive inputs from various sources. For example, QAsystem 100 may receive input from the network 102, a corpus ofelectronic documents 107 or other data, semantic data 108, and otherpossible sources of input. In one embodiment, some or all of the inputsto QA system 100 route through the network 102 and stored in knowledgebase 106. The various computing devices on the network 102 may includeaccess points for content creators and content users. Some of thecomputing devices may include devices for a database storing the corpusof data. The network 102 may include local network connections andremote connections in various embodiments, such that QA system 100 mayoperate in environments of any size, including local and global, e.g.,the Internet. Additionally, QA system 100 serves as a front-end systemthat can make available a variety of knowledge extracted from orrepresented in documents, network-accessible sources and/or structureddata sources. In this manner, some processes populate the knowledgemanager with the knowledge manager also including input interfaces toreceive knowledge requests and respond accordingly.

In one embodiment, a content creator creates content in a document 107for use as part of a corpus of data with QA system 100. The document 107may include any file, text, article, or source of data for use in QAsystem 100. Content users may access QA system 100 via a networkconnection or an Internet connection to the network 102, and may inputquestions to QA system 100, which QA system 100 answers according to thecontent in the corpus of data. As further described below, when aprocess evaluates a given section of a document for semantic content,the process can use a variety of conventions to query it from knowledgemanager 104. One convention is to send a well-formed question.

Semantic data 108 is content based on the relation between signifiers,such as words, phrases, signs, and symbols, and what they stand for,their denotation, or connotation. In other words, semantic data 108 iscontent that interprets an expression, such as by using Natural LanguageProcessing (NLP). In one embodiment, the process sends well-formedquestions (e.g., natural language questions, etc.) to QA system 100 andQA system 100 may interpret the question and provide a response thatincludes one or more answers to the question. In some embodiments, QAsystem 100 may provide a response to users in a ranked list of answers.

In some illustrative embodiments, QA system 100 may be the IBM Watson™QA system available from International Business Machines Corporation ofArmonk, N.Y., which is augmented with the mechanisms of the illustrativeembodiments described hereafter. The IBM Watson™ knowledge managersystem may receive an input question which it then parses to extract themajor features of the question, that in turn are then used to formulatequeries that are applied to the corpus of data. Based on the applicationof the queries to the corpus of data, a set of hypotheses, or candidateanswers to the input question, are generated by looking across thecorpus of data for portions of the corpus of data that have somepotential for containing a valuable response to the input question.

The IBM Watson™ QA system then performs deep analysis on the language ofthe input question and the language used in each of the portions of thecorpus of data found during the application of the queries using avariety of reasoning algorithms. There may be hundreds or even thousandsof reasoning algorithms applied, each of which performs differentanalysis, e.g., comparisons, and generates a score. For example, somereasoning algorithms may look at the matching of terms and synonymswithin the language of the input question and the found portions of thecorpus of data. Other reasoning algorithms may look at temporal orspatial features in the language, while others may evaluate the sourceof the portion of the corpus of data and evaluate its veracity.

The scores obtained from the various reasoning algorithms indicate theextent to which the potential response is inferred by the input questionbased on the specific area of focus of that reasoning algorithm. Eachresulting score is then weighted against a statistical model. Thestatistical model captures how well the reasoning algorithm performed atestablishing the inference between two similar passages for a particulardomain during the training period of the IBM Watson™ QA system. Thestatistical model may then be used to summarize a level of confidencethat the IBM Watson™ QA system has regarding the evidence that thepotential response, i.e. candidate answer, is inferred by the question.This process may be repeated for each of the candidate answers until theIBM Watson™ QA system identifies candidate answers that surface as beingsignificantly stronger than others and thus, generates a final answer,or ranked set of answers, for the input question. More information aboutthe IBM Watson™ QA system may be obtained, for example, from the IBMCorporation website, IBM Redbooks, and the like. For example,information about the IBM Watson™ QA system can be found in Yuan et al.,“Watson and Healthcare,” IBM developerWorks, 2011 and “The Era ofCognitive Systems: An Inside Look at IBM Watson and How it Works” by RobHigh, IBM Redbooks, 2012.

Types of information handling systems that can utilize QA system 100range from small handheld devices, such as handheld computer/mobiletelephone 110 to large mainframe systems, such as mainframe computer170. Examples of handheld computer 110 include personal digitalassistants (PDAs), personal entertainment devices, such as MP3 players,portable televisions, and compact disc players. Other examples ofinformation handling systems include pen, or tablet, computer 120,laptop, or notebook, computer 130, personal computer system 150, andserver 160. As shown, the various information handling systems can benetworked together using computer network 102. Types of computer network102 that can be used to interconnect the various information handlingsystems include Local Area Networks (LANs), Wireless Local Area Networks(WLANs), the Internet, the Public Switched Telephone Network (PSTN),other wireless networks, and any other network topology that can be usedto interconnect the information handling systems. Many of theinformation handling systems include nonvolatile data stores, such ashard drives and/or nonvolatile memory. Some of the information handlingsystems shown in FIG. 1 depicts separate nonvolatile data stores (server160 utilizes nonvolatile data store 165, and mainframe computer 170utilizes nonvolatile data store 175. The nonvolatile data store can be acomponent that is external to the various information handling systemsor can be internal to one of the information handling systems. Anillustrative example of an information handling system showing anexemplary processor and various components commonly accessed by theprocessor is shown in FIG. 2.

FIG. 2 illustrates information handling system 200, more particularly, aprocessor and common components, which is a simplified example of acomputer system capable of performing the computing operations describedherein. Information handling system 200 includes one or more processors210 coupled to processor interface bus 212. Processor interface bus 212connects processors 210 to Northbridge 215, which is also known as theMemory Controller Hub (MCH). Northbridge 215 connects to system memory220 and provides a means for processor(s) 210 to access the systemmemory. Graphics controller 225 also connects to Northbridge 215. In oneembodiment, PCI Express bus 218 connects Northbridge 215 to graphicscontroller 225. Graphics controller 225 connects to display device 230,such as a computer monitor.

Northbridge 215 and Southbridge 235 connect to each other using bus 219.In one embodiment, the bus is a Direct Media Interface (DMI) bus thattransfers data at high speeds in each direction between Northbridge 215and Southbridge 235. In another embodiment, a Peripheral ComponentInterconnect (PCI) bus connects the Northbridge and the Southbridge.Southbridge 235, also known as the I/O Controller Hub (ICH) is a chipthat generally implements capabilities that operate at slower speedsthan the capabilities provided by the Northbridge. Southbridge 235typically provides various busses used to connect various components.These busses include, for example, PCI and PCI Express busses, an ISAbus, a System Management Bus (SMBus or SMB), and/or a Low Pin Count(LPC) bus. The LPC bus often connects low-bandwidth devices, such asboot ROM 296 and “legacy” I/O devices (using a “super I/O” chip). The“legacy” I/O devices (298) can include, for example, serial and parallelports, keyboard, mouse, and/or a floppy disk controller. The LPC busalso connects Southbridge 235 to Trusted Platform Module (TPM) 295.Other components often included in Southbridge 235 include a DirectMemory Access (DMA) controller, a Programmable Interrupt Controller(PIC), and a storage device controller, which connects Southbridge 235to nonvolatile storage device 285, such as a hard disk drive, using bus284.

ExpressCard 255 is a slot that connects hot-pluggable devices to theinformation handling system. ExpressCard 255 supports both PCI Expressand USB connectivity as it connects to Southbridge 235 using both theUniversal Serial Bus (USB) the PCI Express bus. Southbridge 235 includesUSB Controller 240 that provides USB connectivity to devices thatconnect to the USB. These devices include webcam (camera) 250, infrared(IR) receiver 248, keyboard and trackpad 244, and Bluetooth device 246,which provides for wireless personal area networks (PANs). USBController 240 also provides USB connectivity to other miscellaneous USBconnected devices 242, such as a mouse, removable nonvolatile storagedevice 245, modems, network cards, ISDN connectors, fax, printers, USBhubs, and many other types of USB connected devices. While removablenonvolatile storage device 245 is shown as a USB-connected device,removable nonvolatile storage device 245 could be connected using adifferent interface, such as a Firewire interface, etcetera.

Wireless Local Area Network (LAN) device 275 connects to Southbridge 235via the PCI or PCI Express bus 272. LAN device 275 typically implementsone of the IEEE 0.802.11 standards of over-the-air modulation techniquesthat all use the same protocol to wireless communicate betweeninformation handling system 200 and another computer system or device.Optical storage device 290 connects to Southbridge 235 using Serial ATA(SATA) bus 288. Serial ATA adapters and devices communicate over ahigh-speed serial link. The Serial ATA bus also connects Southbridge 235to other forms of storage devices, such as hard disk drives. Audiocircuitry 260, such as a sound card, connects to Southbridge 235 via bus258. Audio circuitry 260 also provides functionality such as audioline-in and optical digital audio in port 262, optical digital outputand headphone jack 264, internal speakers 266, and internal microphone268. Ethernet controller 270 connects to Southbridge 235 using a bus,such as the PCI or PCI Express bus. Ethernet controller 270 connectsinformation handling system 200 to a computer network, such as a LocalArea Network (LAN), the Internet, and other public and private computernetworks.

While FIG. 2 shows one information handling system, an informationhandling system may take many forms, some of which are shown in FIG. 1.For example, an information handling system may take the form of adesktop, server, portable, laptop, notebook, or other form factorcomputer or data processing system. In addition, an information handlingsystem may take other form factors such as a personal digital assistant(PDA), a gaming device, ATM machine, a portable telephone device, acommunication device or other devices that include a processor andmemory.

FIGS. 3-14 depict an approach that can be executed on an informationhandling system that reorders text from unstructured sources, such asPortable Document Format (PDF) sources, to a stream of characterscoinciding with the intended reading flow of the document. FIGS. 3-7provide an example of how a stream of characters are extracted from aPDF source file to form sections that are rendered on an output device.The position of the sections in the rendition are shown having littlerelation to the order that the graphic drawing operations were found inthe source PDF file. The example shown in FIGS. 3-7 further depictsexample section data for the various sections as well as a visualrepresentation showing how the various sections are merged to finallyform a final larger section that would be suitable for ingestion by aprocess. One such process is an ingestion process utilized by a questionanswering (QA) system that ingests documents and uses Natural LanguageProcessing (NLP) operations on the documents to answer questions posedby users. Because the ordering of the final larger section that resultsfrom the merger is in an order coinciding with the intended reading ofthe document, rather than the order in which the operations appear inthe PDF source, the efficiency of the QA system in using NLP operationsto ingest the final larger section is improved which improves thefunctionality of the QA system. The performance of other computersystems, such as those that utilize NLP operations to extract contentfrom online sources (e.g., search engines, text processors, etc.), wouldalso be improved by utilizing the final larger section rather thanutilizing the source PDF file.

FIGS. 8-14 show the processes utilized to reorder the text fromunstructured sources, such as that found in PDFs, to a form a singlesection that is ordered in an intended human reading order, rather thanthe order that the graphic drawing operations appeared in the PDF sourcefile. Sections are identified from the stream of characters extractedfrom the PDF source file based on spacing of characters, such as whitespace, given the individual characters' coordinate positions. Links,both vertical and horizontal, between the identified sections areestablished to facilitate merging based upon different sets of rules.Sections are repeatedly merged with each other to form increasinglylarger sections until a final larger section is generated. Aftersections are merged, the link builder rebuilds links between the newlymerged (larger) section and the other sections.

Rules used to identify mergers include special rules and main rules.Special rules are utilized to identify sections to merge that falloutside the main rules. Examples of special rules include merging“island” sections in a document that are not positioned vertically orhorizontally with other sections as well as merging initial sectionswith appropriate sections. Initial sections are initial characters suchas a first capital character of a paragraph rendered in a larger fontsize, often much larger, than the font sized used for characters in thesubsequent paragraph body. The process merges the initial character withthe subsequent paragraph body using a special rule.

Main rules identify sections to merge based on vertical and horizontalproximity to each other. A selected section identified with a singledown link to a reference section are merged with the reference sectionso long as the reference section only has a single up link to theselected section. In one embodiment, all sections that can be verticallymerged using the rule are processed and merged before moving tohorizontal rules. In this embodiment, when no more vertical mergercandidates are found, the horizontal merging rules select and merge asection with a single right link to a reference section so long as thereference section only has a single left link to the selected section.The repeated performance of the special rules and the main rulesultimately results in a single larger section that contains thecharacters from the original PDF ordered in the intended human readingorder rather than the order that the characters were found in the PDFsource file.

While the descriptions provided herein pertain to languages intended tobe read from left to right and top to bottom, it will be appreciatedthat such teachings and concepts can be applied to languages that areintended to be read in a different fashion. For example, languages thatare intended to be read from right to left can use merger rules thatappend the text from sections on the left side of a page to sections onthe right side of the page.

FIG. 3 is an exemplary diagram depicting the relationship between aPortable Document Format (PDF) source and a resulting rendition of thePDF source. Original PDF source file 350 shows a number of statefulgraphic drawing operations that, when processed, render PDF image 1. Forsimplicity, a contiguous set of stateful graphic operations is showncorresponding to a particular section however, this need not be thecase, as the operations used to render a particular section might bedisjointed within PDF source file 350. Stateful graphic drawingoperations 351 are used to render section 301, stateful graphic drawingoperations 352 are used to render section 302, stateful graphic drawingoperations 353 are used to render section 303, with further operationsused to render sections 304 through 329 until stateful graphic drawingoperations 380 are used to render section 330.

The ordering of the sections in resulting PDF image 1 does not coincidewith the order of the stateful graphic drawing operations found inoriginal PDF file 350. For example, the first set of stateful graphicoperations (351) renders section 301 which is found below sections 326,327, 328, and 306 and to the right of sections 315 and 324. Conversely,the first section that appears at the top of PDF image 1 (section 326)is the 26th set of stateful graphics operations found in PDF source file350. FIGS. 5-7 show examples of how repeated merging of the sectionsshown in PDF image 1, using the processes shown in FIGS. 8-14, resultsin a final section of text ordered in human-readable fashion. In theexample, the order of text in the final merged file would be section 326followed, in order, by sections 327, 328, 315, 324, 323, 316, 317, 307,308, 309, 310, 311, 312, 313, 314, 306, 301, 302, 303, 304, 305, 318,319, 320, 321, 322, 329, and finally section 330.

FIG. 4 is an exemplary diagram depicting sections derived from thePortable Document Format (PDF) source and their respective coordinatepositions. PDF image 1 is shown overlaid with exemplary row and columnpositional markers showing the coordinate positions of the varioussections. Section data 400 is a table of boundary coordinates of theimaginary rectangle bounding each of the sections. Each of the sectionsis identified by a unique section number (section numbers 301 through330). A set of start coordinates (row and column) is provided indicatingthe upper left hand corner of each sections' boundary rectangles and aset of stop coordinates (row and column) is also provided indicating thelower right hand corner of each sections' boundary rectangles. Therelative position of each sections' coordinates are used to find overlapbetween sections in both vertical and horizontal directions.

Sections are linked to one another when an overlap is found and nointervening sections are detected. For example, section 320 has verticalcommonality (one or more shared x coordinates) with sections 327, 328,306, 318, 319, 321, 322, 329, and 330. However, a vertical link is onlyestablished between section 320 and sections 319 and 321. An upward linkis established between section 320 and section 319 and a downward isestablished between section 320 and section 321 because the othersections listed have one or more intervening sections positioned betweenthem and section 320. Likewise, section 320 has horizontal commonality(one or more shared y coordinates) with sections 308, 309, 310, 311,312, 303, and 304. However, horizontal links are only establishedbetween section 320 and 303 and between 320 and 304, both in a leftdirection. There are no sections to the right of section 320, so theright links associated with section 320 would be blank or zero toindicate that no such links exist.

The detection of vertical commonality and any intervening sections canreadily be found by processing section data 400 which essentiallyfollows the row and column positional markers shown overlaid onto PDFimage 1. The actual character data (text of paragraph, titles, headings,etc.) as well as character metadata is also associated with, or storedwith, the corresponding section in section data 400. In addition, links(up links, down links, left links, and right links) to other sections,as described above, are also associated with the respective sectionidentifier. Using the section 320 example from above, section data 400includes the sections unique section identifier (in this case, section320), rectangular boundary starting coordinates of section 320 (in thiscase, column 175 and row 0260), and rectangular boundary stoppingcoordinates of section 320 (in this case, column 255 and row 0385).Looking at the overlay of PDF image 1, the coordinates form arectangular area forming a boundary around section 320 and do notinclude any other sections in the bounded area. Character data, such astext of a paragraph that appears in the bounded rectangular area, wouldalso be associated with section 320 as well as character metadata (e.g.,font size, font color, etc.). Link data would also be associated withsection identifier 320. In this case, vertical links would include an uplink to link section 320 upward to section 319 and a down link to linksection 320 downward to section 321. Horizontal links would include twoleft links—one left link linking section 320 to section 303 and anotherleft link linking section 320 to section 304. The sections linked tosection 320 would also have links back to section 320 as well as otherlinks to other sections.

When two or more sections are merged, section data is updated to reflectthe larger rectangular boundary used to bound the merged sections. Asshown in FIG. 5, section 320 will be merged with section 319 forming anew larger section (section 540). A merger combines the coordinate datafrom the merged sections as well as the data and metadata with the databeing combined based upon the relative positions of the sections thatwere merged. A new entry is made to section data reflecting both thecombined coordinate data. Section 540's rectangle start coordinateswould be column 175 and row 0135 the same as section 319's startingcoordinates, and its rectangle stop coordinates would be column 255, row385 which is the same as section 320's stopping coordinates. Data andmetadata associated with section 320 would be appended to data andmetadata associated with section 319 with the combined data associatedwith new section 540. Links would then be built between section 540 andother sections. Sections 319 and 320 are either removed or marked asinactive in section data 400. After the merger, sections 319 and 320 areno longer active, consequently any links to either of these sectionsfrom other sections are rebuilt. For example, section 321's uplink tosection 320 is discarded and a new uplink is established between section321 and new section 540. Likewise, section 318's downlink to section 319is also discarded and a new downlink is established between section 318and 319. Similarly, right links associated between section 302 andsection 319, section 303 and sections 319 and 320, and section 304 andsection 320 are all discarded and new right links are establishedbetween section 302 and new section 540, section 303 and new section540, and section 304 and new section 540.

FIG. 5 is an exemplary diagram depicting the first three mergingoperations that merge sections into larger sections based on the readingflow of the rendered Portable Document Format (PDF) document. Sectionsare candidates for vertical merging when each has one and only onevertical link to the other section. For example, sections 319 and 320are merger candidates because section 319 has one, and only one,downlink to section 320 and, conversely, section 320 has one, and onlyone, uplink and that uplink is to section 319. On the other hand,sections 306 and 318 are not candidates for vertical merging because,while section 318 only has a single uplink to section 306, section 306has more than one downlinks (one to section 301 and another to section318).

Various sections shown in PDF image 1 are vertically merged forming PDFimage 2. In particular, new section 540 is formed by the merger ofsections 319 and 320, new section 541 is formed by the merger ofsections 308, 309, and 310, new section 542 is formed by the merger ofsections 312, 313, and 314, and new section 543 is formed by the mergerof sections 302, 303, and 304. As previously mentioned, in oneembodiment vertical merging of sections is performed until no morevertical merging is possible, at which point horizontal merging isperformed.

PDF image 3 shows the result of merging various sections from PDF image2. In particular, new section 551 is formed by the merger of sections318 and 540, new section 552 is formed by the merger of sections 321 and322, and new section 553 is formed by the merger of sections 326, 327,and 328. New section 554 is formed by the merger of sections 311 and542, new section 555 is formed by the merger of sections 307 and 541,and new section 556 is formed by the merger of sections 301 and 543.

PDF image 4 shows the result of merging various sections from PDF image3. In particular, new section 561 is formed by the merger of sections551 and 552, new section 562 is formed by the merger of sections 556 and305, and new section 563 is formed by the merger of sections 315, 324,323, 316, 317, 555, and 554.

FIG. 6 is an exemplary diagram depicting the next three mergingoperations that further merge sections into larger sections based on thereading flow of the rendered Portable Document Format (PDF) document. Aspreviously described, sections are candidates for vertical merging wheneach section has one, and only one, vertical link to the other section.In PDF image 4, there are no more candidates for vertical merging.Consequently, horizontal merging commences. PDF image 5 shows the resultof horizontal merging various sections from PDF image 4. In particular,new section 601 is formed by the horizontal merger of sections 561 and562.

After horizontal merging, the process checks to determine if morevertical merging is possible after the horizontal merging has takenplace. PDF image 6 shows the result of further vertical merging sectionsfrom PDF image 5. In particular, section 601 can now be verticallymerged with section 306 forming new section 602.

Since no further vertical merging can be performed, further horizontalmerging is performed. PDF image 7 shows the result of horizontallymerging sections from PDF image 6. In particular, section 603 is formedfrom the horizontal merger of sections 329 and 330.

FIG. 7 is an exemplary flowchart depicting the last three mergingoperations that further merge sections into increasingly larger sectionswith the final result being a single section where all of the charactersappear in the order that they are likely intended to be read by a humanreader. None of the sections shown in PDF image 7 are candidates forvertical merging so further horizontal merging is performed. PDF image 8shows the result of horizontally merging sections found in PDF image 7.In particular, new section 701 is formed by horizontally mergingsections 663 and 602.

After horizontal merging is performed to create PDF image 8, furthervertical merging is performed on the sections to generate PDF image 9.In particular, new section 702 is formed by vertically merging sections701 and 603. Finally, as shown in PDF image 10, the last remainingsections from PDF image 9, sections 553 and 702, are vertically mergedto form final large section 703. Since PDF image 10 has only a singlesection, merging of the sections is complete. Section 703 now containsthe text from the original PDF ordered in a human-readable fashion. Thetext from section 703 can be digested by Natural Language Processing(NLP) operations to improve the functionality of systems that utilizeunstructured data. These systems include question answering (QA)systems, such as QA system 100 shown in FIG. 1.

FIG. 8 is an exemplary flowchart depicting overall steps performed bythe process that reorders text from unstructured sources, such asPortable Document Format (PDF) sources, to a stream of characterscoinciding with the intended reading flow of the document. FIG. 8commences at 800 and shows the steps taken by a process that reorderstext from unstructured sources, such as that found in PDFs, to a form asingle section that is ordered in an intended human reading order,rather than the order that the graphic drawing operations appeared inthe PDF source file. At step 810, the process reads the first statefulgraphic drawing operation from PDF source 820. For example, a statefulgraphic drawing operation may be to move the cursor to a particularposition (e.g., 100, 200), set the font color to a particular color(e.g., red, etc.), and print a particular character (e.g., “W”, etc.) atthe location. In a PDF, a stateful graphic drawing operation isperformed for each character and graphic element to be rendered on theoutput device, such as a screen or printer. Step 810 stores thecharacter data, as well as metadata pertaining to such characters, insequence of characters memory area 825. The process determines as towhether more stateful graphic drawing operations are included in the PDFsource (decision 830). If more operations are included, then decision830 branches to the ‘yes’ branch which loops back to step 810 to readthe next stateful graphic drawing operation from the PDF and store thecharacter data in memory area 825. This looping continues until all ofthe stateful graphic drawing operations included in the PDF have beenprocessed, at which point decision 830 branches to the ‘no’ branch forfurther processing.

At predefined process 840, the process performs the Extract Sectionsfrom Sequence of Characters routine (see FIG. 9 and corresponding textfor processing details). Sections might include such textual areas suchas paragraphs, headings, titles, and the like. Predefined process 840processes the sequence of characters data from memory area 825 andidentifies spacing between sets of characters that indicates a section,such as a paragraph, title, etc. Data regarding the sections are storedin memory area 400. This data includes a unique section identifier, thecoordinates that form a rectangular boundary around the section (e.g.,upper left hand row and column coordinates, lower right hand row andcolumn coordinates, etc.), and the data belonging to the section (e.g.,the text of a paragraph, heading, title, etc.). In addition, eachsection can be associated with links (uplink(s) to section(s) above thissection, downlink(s) to section(s) below this section, right link(s) tosections to the right of this section, and left link(s) to sections tothe left of this section).

At predefined process 850, the process performs the Link Buildingroutine (see FIG. 10 and corresponding text for processing details). Asthe name implies, the Link Building routine identifies and establisheslinks between the various sections. The links are established with thevarious sections included in the section data that is stored in memoryarea 400. The links built by the Link Building routine are used toidentify sections to merge by following sets of “special rules” and setsof “main rules.” Main rules are used to identify sections to merge basedupon vertical and horizontal proximity to one another. Special rules, onthe other hand, are rules for merging sections that fall outside themain rules.

At predefined process 860, the process performs the Special Rulesroutine (see FIG. 11 and corresponding text for processing details).After the Special Rules are performed, the process determines as towhether any of the special rules were triggered identifying sections tomerge based on the special rules (decision 865). If a special rule wastriggered, then decision 865 branches to the ‘yes’ branch whereupon, atpredefined process 880, the sections identified for merging based on thespecial rules are merged (see FIG. 14 and corresponding text for detailsregarding the merge process). Processing loops back to the Link Buildingroutine (predefined process 840) after the merge routine completes.

On the other hand, if none of the special rules were triggered, thendecision 865 branches to the ‘no’ branch. Following the ‘no’ branch, atpredefined process 870, the process performs the Main Rules routine (seeFIG. 12 and corresponding text for processing details). The main rulesidentify sections to merge based upon vertical proximity to one anotherand, if no vertically proximate sections can be merged, then the mainrules identify sections to merge based upon horizontal proximity to oneanother. The process determines as to whether any main rules (verticalor horizontal) were triggered by predefined process 870 (decision 875).If a vertical or horizontal rule was triggered, then decision 875branches to the ‘yes’ branch whereupon the sections identified for mainrule merging are merged using the Merge routine (predefined process880). Processing loops back to the Link Building routine (predefinedprocess 840) after the merge routine completes.

On the other hand, if no main rules were triggered, then decision 875branches to the ‘no’ branch. Since no rules (special rules or mainrules) have been triggered, there are no more sections to merge.Consequently, the character data from PDF source 820 has beenconsolidated into a single section that is ordered in an intended humanreading order, rather than the order that the graphic drawing operationsappeared in the PDF source file. The data, now arranged in an orderintended for human reading, is stored in memory area 885. At step 890,the process provides the reordered data to the requestor. In oneembodiment, the requestor is a process that ingests the data from memoryarea 885 to data store 106. In this embodiment, data store 106 is acorpus utilized by a QA system, such as QA system 100 shown in FIG. 1,to answer questions posed from a user. In another embodiment, therequestor is a user or other requesting process, in which case the datastored in memory area 885 is provided to requestor 895.

FIG. 9 is an exemplary flowchart depicting steps that extract sectionsfrom a sequence of characters found in the Portable Document Format(PDF) source. FIG. 9 commences at 900 and shows the steps taken by aprocess that performs the Extract Sections routine.

At step 910, the process derives spaces in the character data stored inmemory area 825. The average width of characters is calculated and theprocess uses the width of the space and the separation betweencharacters to derive the various spaces (vertical and horizontal spaces)in the document. Step 910 retrieves the character data and metadata frommemory area 825. The character data includes the character that isprinted and the metadata includes data about the character such as itscoordinate positions, font, font size, font color, etc.

At step 920, the process identifies the first contiguous character blockas a section. At step 930, the process generates a unique identifier toassign to this section. The process stores the section identifier insection data memory area 400. At step 940, the process stores column androw (coordinates) where this section starts and where this section ends.The coordinates form a rectangle that bound the area that the sectionresides on the PDF image. The rectangle's starting coordinates (columnand row) are stored marking the upper left hand corner of the rectangleand the ending coordinates (column and row) are also stored marking thelower right hand corner of the rectangle. The rectangle starting andending coordinates are stored in section data memory area 400. At step950, the process stores the data (characters, character metadata, etc.)that are included in this section in section data memory area 400.

At step 960, the process initializes links (uplinks, downlinks, leftlinks, and right links) of this section to Null. The link data isassociated with the section identifier that is stored in section datamemory area 400. In one embodiment, the link data is stored in aseparate data structure and associated with the section data so that amany-to-one relationship can exist between the section and any of thelink types. For example, a particular section might have zero rightlinks, one uplink, one downlink, and multiple left links. In decision970, the process determines as to whether more sections were identifiedby step 910. If more sections were identified, then decision 970branches to the ‘yes’ branch which loops back to step 920 to identifythe next section and store data pertaining to the newly identifiedsection. This looping continues until there are no more sections toprocess, at which point decision 970 branches to the ‘no’ branch andprocessing returns to the calling routine (see FIG. 8) at 995.

FIG. 10 is an exemplary flowchart depicting steps that build varioustypes of links between the sections. FIG. 10 commences at 1000 and showsthe steps taken by a process that performs the Link Building routine. Atstep 1005, the process selects the first section from the section datathat is stored in memory area 400. The process determines as to whetherare any links associated with the selected section that are Null OR ifthe selected section has links that refer to one or more sections thatno longer exist (decision 1010). If there are any links associated withthe selected section that are Null OR if the selected section has linksthat refer to one or more sections that no longer exist, then decision1010 branches to the ‘yes’ branch to identify any links between thissection and other sections. On the other hand, if none of the linksassociated with the selected section are Null and selected section doesnot have any links referring to sections that no longer exist, thendecision 1010 branches to the ‘no’ branch whereupon processing loopsback to step 1005 to select the next section from section data 400.

At step 1015, the process selects the first reference section. Duringthe loop, each of the other sections included in section data 400 isselected as a reference section and compared with the selected sectionto identify whether a link should be established between the selectedsection and each of the reference sections.

At step 1020, the process selects the first link type (uplink, downlink,left link, and right link). In one embodiment only one of the verticallink types (e.g., the downlink) is selected followed by selection of oneof the horizontal link type (e.g., the right link) with thecorresponding link being identified and established in the referencelink. For example, when processing a selected section, if an uplink isdetected from a selected reference section to a selected referencesection then the uplink to the reference section is established in theselected section and a downlink to the selected section is establishedin the reference section. Likewise, if a right link is detected from aselected reference section to a selected reference section then theright link to the reference section is established in the selectedsection and a left link to the selected section is established in thereference section.

At step 1025, the process checks for the selected link type (overlap ofcoordinates) between selected section and this reference section on anaxis perpendicular to the link direction. For example, when checking foran uplink from a selected section, the coordinates of reference sectionsabove the selected section are identified as possible uplink candidates.Likewise, when checking for a right link from a selected section, thecoordinates of reference sections to the right of the selected sectionare identified as possible right link candidates. The process determinesas to whether an overlap exists between coordinates of the selectedsection and the reference section in the direction of the link on anaxis perpendicular to the link direction (decision 1030). If an overlapexists, then decision 1030 branches to the ‘yes’ branch for furtherprocessing. On the other hand, if no overlap exists, then decision 1030branches to the ‘no’ branch bypassing steps 1035 through 1045.

At step 1035, the process checks for any other sections between, orpartially between, the selected section and the reference section in theoverlap range. In essence, an imaginary rectangle is drawn between theselected section and the reference section. In the case of a verticallink (uplink/downlink), the imaginary rectangle is formed with a widthbeing the overlap between the selected section and the reference sectionand a height being the distance between the bottom edge of the sectionwith a possible downlink (e.g., the reference section) and the top edgeof the section with a possible uplink (e.g., the selected section). Inthe case of a horizontal link (right link/left link), the imaginaryrectangle is formed with a height being the overlap between the selectedsection and the reference section and a width being the distance betweenthe left edge of the section with a possible left link (e.g., thereference section) and the right edge of the section with a possibleright link (e.g., the selected section). If any part of any othersection, or sections, is found in this imaginary rectangle, then theother section(s) are said to be in between the selected section and thereference section.

The process determines as to whether any other section(s) are found tobe in between the selected section and the reference section (decision1040). If other section(s) are in between the selected section and thereference section, then decision 1040 branches to the ‘yes’ branchbypassing step 1045 as the selected section and the reference sectionare not valid link candidates. On the other hand, if no other sectionslie in between the selected section and the reference section, thendecision 1040 branches to the ‘no’ branch whereupon the appropriatelinks are established between the selected section and the referencesection. For example, if an uplink was found to exist from the selectedsection to the reference section, than an uplink is established for theselected section linking to the reference section and a downlink isestablished for the reference section linking back to the selectedsection.

The process determines as to whether there more link types to checkbetween the selected section and this reference section (decision 1050).If there are more link types to check, then decision 1050 branches tothe ‘yes’ branch which loops back to step 1020 to select the next linktype. This looping continues until there are no more link types to checkbetween the selected section and the reference section, at which pointdecision 1050 branches to the ‘no’ branch.

The process next determines as to whether there more reference sectionsto select and process for possible links with the selected section(decision 1055). If there are more reference sections to process, thendecision 1055 branches to the ‘yes’ branch whereupon processing loopsback to step 1015 to select and process the next reference section. Thislooping continues until there are no more reference sections to process(all of the other sections have been checked for links with the selectedsection), at which point decision 1055 branches to the ‘no’ branch.

The process then determines as to whether there are any more sections toselect and process (decision 1060). If there are more sections to selectand process, then decision 1060 branches to the ‘yes’ branch which loopsback to step 1005 to select the next section from section data 400 andthe newly selected section is checked for possible vertical andhorizontal links as described above. This looping continues until all ofthe sections included in section data 400 have been processed, at whichpoint decision 1060 branches to the ‘no’ branch and processing returnsto the calling routine (see FIG. 8) at 1095.

FIG. 11 is an exemplary flowchart depicting steps that perform specialrules on some sections found in the unstructured source. At step 1110,the process identifies any “special” cases for merging. Special casesinclude “island” or “orphan” sections that have no links betweenthemselves and other any other sections. Special cases also includeidentification of an “initial” section that is typically a very largefirst letter of a paragraph identified as separate section and needingto be merged with the remaining paragraph text in another sectionrendered in a normal font size.

The process determines as to whether any “special” cases were identifiedin step 1110 (decision 1120). If any “special” cases were identified,then decision 1120 branches to the ‘yes’ branch to process the specialcases. At step 1130, the process selects the identified special case andthe section with which it is being merged. The “selected” section andthe “reference” section are chosen based on the respective coordinatesso that the selected section appears before the reference section. Inthis manner, the section identified with the special case may be eitherthe selected section or the reference section. If the section having thespecial case is identified as the selected section, then the othersection is identified as the reference section. Conversely, if thesection having the special case is identified as the reference section,then the other section is identified as the selected section.

At step 1140, the process sets the triggered flag to TRUE to indicatethat a special rule was triggered during processing of the specialrules. Returning to decision 1120, if no “special” cases were identifiedat step 1110, then decision 1120 branches to the ‘no’ branch whereupon,at step 1150, the process sets the triggered flag to FALSE indicatingthat no rules were triggered during processing of the special rules.FIG. 11 processing thereafter returns to the calling routine (see FIG.8) at 1195.

FIG. 12 is an exemplary flowchart depicting steps that perform mainrules on sections found in the unstructured source in a top-down(vertical) fashion. FIG. 12 commences at 1200 and shows the steps takenby a process that performs main vertical rules processing. At step 1210,the process selects the first section for possible vertical merging withthe section being selected from section data 400. The process determinesas to whether the selected section has only a single (one) downlink(decision 1220). If selected section has only a single (one) downlink,then decision 1220 branches to the ‘yes’ branch for further processing.On the other hand, if the selected section does not have a solitarydownlink (e.g., has no downlinks or has multiple down links), thendecision 1220 branches to the ‘no’ branch bypassing step 1230.

At step 1230, the process retrieves link data from the sectionreferenced in the downlink (the reference section). At decision 1240,the process determines as to whether the reference section has only asingle (one) uplink (with the uplink being a link to the selectedsection). If the reference section has only one uplink link (a link tothe selected section), then decision 1240 branches to the ‘yes’ branchwhereupon, at step 1250, the triggered flag is set to TRUE indicatingthat a merge was identified while processing the main rules and theidentified selected section will be merged with the identified referencesection and processing returns to the calling routine (see FIG. 8) at1295. On the other hand, if the reference section has more than oneuplink, then decision 1240 branches to the ‘no’ branch bypassing step1250.

The process determines as to whether there are more sections to checkfor possible vertical merging (decision 1270). If there are moresections to check, then decision 1270 branches to the ‘yes’ branch whichloops back to step 1210 to select and process the next section forpossible vertical merging. This looping continues until there are nomore sections to check, at which point decision 1270 branches to the‘no’ branch. At predefined process 1280, the process performs the MainHorizontal Rules routine (see FIG. 13 and corresponding text forprocessing details). The Main Horizontal Rules routine will set thetriggered flag to TRUE if sections are identified for horizontal mergingor FALSE if no sections are identified for horizontal merging. FIG. 12processing thereafter returns to the calling routine (see FIG. 8) at1295.

FIG. 13 is an exemplary flowchart depicting steps that perform mainrules on sections found in the unstructured source in a left-right(horizontal) fashion. FIG. 13 commences at 1300 and shows the stepstaken by a process that performs main horizontal rules processing. Atstep 1310, the process selects the first section for possible horizontalmerging with the section being selected from section data 400. Theprocess determines as to whether the selected section has only a single(one) right link (decision 1320). If selected section has only a single(one) right link, then decision 1320 branches to the ‘yes’ branch forfurther processing. On the other hand, if the selected section does nothave a solitary right link (e.g., has no right links or has multipledown links), then decision 1320 branches to the ‘no’ branch bypassingstep 1330.

At step 1330, the process retrieves link data from the sectionreferenced in the right link (the reference section). At decision 1340,the process determines as to whether the reference section has only asingle (one) left link (with the left link being a link to the selectedsection). If the reference section has only one left link (a link to theselected section), then decision 1340 branches to the ‘yes’ branchwhereupon, at step 1350, the triggered flag is set to TRUE indicatingthat a merge was identified while processing the main rules and theidentified selected section will be merged with the identified referencesection and processing returns to the calling routine (see FIG. 12) at1395. On the other hand, if the reference section has more than one leftlink, then decision 1340 branches to the ‘no’ branch bypassing step1350.

The process determines as to whether there are more sections to checkfor possible horizontal merging (decision 1370). If there are moresections to check, then decision 1370 branches to the ‘yes’ branch whichloops back to step 1310 to select and process the next section forpossible horizontal merging. This looping continues until there are nomore sections to check, at which point decision 1370 branches to the‘no’ branch, whereupon, at step 1380, the triggered flag is set to FALSEindicating that no merges were identified while processing the mainrules. FIG. 13 processing thereafter returns to the calling routine (seeFIG. 12) at 1395.

FIG. 14 is an exemplary flowchart depicting steps that merge sectionsidentified as being appropriate for merging from either the specialrules, or from one of the sets of main rules. FIG. 14 commences at 1400and shows the steps taken by a process that performs the merge routine.At step 1410, the process creates a new section in memory area 400 withthe new section being used to store the result of the merge of theselected section and the reference section. At step 1420, the processgenerates coordinates of the new section based on coordinates ofselected and reference sections so that new section coordinatesencompasses the area of both the selected section and the referencesection. The coordinates of the new section are stored in section data400.

At step 1430, the process appends the data (e.g., text) from thereference section to the data in the selected section and stores thecombined data in the new section in memory area 400. In addition, step1430 also appends the metadata (e.g., fonts, font sizes, font colors,etc.) from the reference section to the metadata in the selected sectionand stores the combined metadata in memory area 400.

At step 1440, the process initializes the links (uplink, downlink, leftlink and right link) associated with the new section to Null indicatingthat such links have not yet been established. At step 1450, the processdeletes the selected section from section data 400. At step 1460, theprocess also deletes the reference section from section data 400. FIG.14 processing thereafter returns to the calling routine (see FIG. 8) at1495.

While particular embodiments of the present disclosure have been shownand described, it will be obvious to those skilled in the art that,based upon the teachings herein, that changes and modifications may bemade without departing from this disclosure and its broader aspects.Therefore, the appended claims are to encompass within their scope allsuch changes and modifications as are within the true spirit and scopeof this disclosure. Furthermore, it is to be understood that thedisclosure is solely defined by the appended claims. It will beunderstood by those with skill in the art that if a specific number ofan introduced claim element is intended, such intent will be explicitlyrecited in the claim, and in the absence of such recitation no suchlimitation is present. For non-limiting example, as an aid tounderstanding, the following appended claims contain usage of theintroductory phrases “at least one” and “one or more” to introduce claimelements. However, the use of such phrases should not be construed toimply that the introduction of a claim element by the indefinitearticles “a” or “an” limits any particular claim containing suchintroduced claim element to disclosures containing only one suchelement, even when the same claim includes the introductory phrases “oneor more” or “at least one” and indefinite articles such as “a” or “an”;the same holds true for the use in the claims of definite articles.

The invention claimed is:
 1. An information handling system comprising:one or more processors; a memory coupled to at least one of theprocessors; and a set of computer program instructions stored in thememory and executed by at least one of the processors in order toperform actions of: identifying a plurality of sections from a sequenceof characters included in a Portable Document Format (PDF) source file,wherein each section includes a unique set of coordinate positions;building a plurality of directional links between the plurality ofsections based on a relative position of each sections' coordinatepositions in relation to other sections' coordinate positions along anaxis; and repeatedly merging two or more sections to form increasinglylarger sections, wherein the merged two or more sections are selectedbased on the directional links built between the two or more sections,wherein the repeatedly merging further comprises building one or morenew directional links between the increasingly larger sections and oneor more remaining sections selected from the plurality of sections, andwherein the repeatedly merging continues until the plurality of sectionsare exhausted and consolidated into a final larger section, wherein thefinal larger section is arranged in an intended reading order.
 2. Theinformation handling system of claim 1 wherein the building of thedirectional links further comprises: selecting one of the sections fromthe plurality of sections; building zero or more directional linksbetween the selected section and the other sections included in theplurality of sections by: establishing zero or more vertical linksbetween the selected section from the plurality of sections and areference section selected from the plurality of sections wherein theselected section has at least one common horizontal coordinate positionwith the selected reference section and wherein a vertical rectanglespace formed by a horizontal boundary of the selected section and acorresponding horizontal boundary the selected reference section is voidof any intervening sections from the plurality of sections; andestablishing zero or more horizontal links between the selected sectionand the selected reference section wherein the selected section has atleast one common vertical coordinate position with the selectedreference section and wherein a horizontal rectangle space formed by avertical boundary of the selected section and a corresponding verticalboundary the selected reference section is void of any interveningsections from the plurality of sections; and repeatedly selecting a nextone of the sections from the plurality of sections and building the zeroor more directional links until each of the sections from the pluralityof sections has been selected.
 3. The information handling system ofclaim 2 wherein the actions further comprise: specially merging two ormore of the plurality of sections by: identifying a first section at afirst set of coordinate positions, wherein the first set of coordinatepositions forms a first rectangular boundary around the first section,and wherein the identification of the first section is based on at leastone special rule; identifying a second section based on at a second setof coordinate positions, wherein the second set of coordinate positionsforms a second rectangular boundary around the second section, andwherein the identification of the second section is based on a proximityto the first section; merging the first and second sections to form oneof the increasingly larger sections; and repeating the building of thezero or more directional links between the increasingly larger sectionformed by the merger of the first and second sections with the othersections included in the plurality of sections.
 4. The informationhandling system of claim 3 wherein identification of the first sectionbased on one of the special rules further comprises: identifying thatthe first section is an island section that is void of any directionallinks to other sections from the plurality of sections.
 5. Theinformation handling system of claim 3 wherein identification of thefirst section based on one of the special rules further comprises:identifying that the first section is an initial character rendered in afirst font size that is larger than a second font size used to render aplurality of characters included in the second section.
 6. Theinformation handling system of claim 2 wherein the actions furthercomprise: vertically merging two or more of the plurality of sectionsby: identifying one of the plurality of sections as a selected sectionand one of the plurality of sections as a reference section, wherein theidentification is based on the selected section including a firstdirectional link to the reference section in a first vertical directionand the reference section including a second directional link to theselected section in an second vertical direction, wherein the secondvertical direction is opposite from the first vertical direction; andmerging the selected section and the reference section to form one ofthe increasingly larger sections; and repeating the building of the zeroor more directional links between the increasingly larger section formedby the merger of the selected section and the reference section with theother sections included in the plurality of sections.
 7. The informationhandling system of claim 6 wherein the actions further comprise:repeatedly performing the vertical merger of sections until exhaustionof selected and reference sections with vertical links is encountered;upon exhaustion of selected and reference sections with vertical links,horizontally merging two or more of the plurality of sections by:identifying one of the plurality of sections as a second selectedsection and one of the plurality of sections as a second referencesection, wherein the identification is based on the second selectedsection including a primary directional link to the reference section ina first horizontal direction and the second reference section includinga secondary directional link to the second selected section in an secondhorizontal direction, wherein the second horizontal direction isopposite from the first horizontal direction; and merging the secondselected section and the second reference section to form one of theincreasingly larger sections; and repeating the building of the zero ormore directional links between the increasingly larger section formed bythe merger of the second selected section and the second referencesection with the other sections included in the plurality of sections.8. The information handling system of claim 7 wherein the actionsfurther comprise: repeatedly performing the special merging, thevertical merging, and the horizontal merging until the increasinglylarger section includes all of the plurality of sections consolidatedinto the final large section; inputting the final large section to acorpus utilized by a question answering (QA) system; and increasing anatural language processing (NLP) performance of the QA system byperforming NLP operations on the final large section instead of the PDFsource file.
 9. A computer program product stored in a computer readablestorage medium, comprising computer program code that, when executed byan information handling system, causes the information handling systemto perform actions comprising: identifying a plurality of sections froma sequence of characters included in a Portable Document Format (PDF)source file, wherein each section includes a unique set of coordinatepositions; building a plurality of directional links between theplurality of sections based on a relative position of each sections'coordinate positions in relation to other sections' coordinate positionsalong an axis; and repeatedly merging two or more sections to formincreasingly larger sections, wherein the merged two or more sectionsare selected based on the directional links built between the two ormore sections, wherein the repeatedly merging further comprises buildingone or more new directional links between the increasingly largersections and one or more remaining sections selected from the pluralityof sections, and wherein the repeatedly merging continues until theplurality of sections are exhausted and consolidated into a final largersection, wherein the final larger section is arranged in an intendedreading order.
 10. The computer program product of claim 9 wherein thebuilding of the directional links further comprises: selecting one ofthe sections from the plurality of sections; building zero or moredirectional links between the selected section and the other sectionsincluded in the plurality of sections by: establishing zero or morevertical links between the selected section from the plurality ofsections and a reference section selected from the plurality of sectionswherein the selected section has at least one common horizontalcoordinate position with the selected reference section and wherein avertical rectangle space formed by a horizontal boundary of the selectedsection and a corresponding horizontal boundary the selected referencesection is void of any intervening sections from the plurality ofsections; and establishing zero or more horizontal links between theselected section and the selected reference section wherein the selectedsection has at least one common vertical coordinate position with theselected reference section and wherein a horizontal rectangle spaceformed by a vertical boundary of the selected section and acorresponding vertical boundary the selected reference section is voidof any intervening sections from the plurality of sections; andrepeatedly selecting a next one of the sections from the plurality ofsections and building the zero or more directional links until each ofthe sections from the plurality of sections has been selected.
 11. Thecomputer program product of claim 10 wherein the actions furthercomprise: specially merging two or more of the plurality of sections by:identifying a first section at a first set of coordinate positions,wherein the first set of coordinate positions forms a first rectangularboundary around the first section, and wherein the identification of thefirst section is based on at least one special rule; identifying asecond section based on at a second set of coordinate positions, whereinthe second set of coordinate positions forms a second rectangularboundary around the second section, and wherein the identification ofthe second section is based on a proximity to the first section; mergingthe first and second sections to form one of the increasingly largersections; and repeating the building of the zero or more directionallinks between the increasingly larger section formed by the merger ofthe first and second sections with the other sections included in theplurality of sections.
 12. The computer program product of claim 11wherein identification of the first section based on one of the specialrules further comprises: identifying that the first section is an islandsection that is void of any directional links to other sections from theplurality of sections.
 13. The computer program product of claim 11wherein identification of the first section based on one of the specialrules further comprises: identifying that the first section is aninitial character rendered in a first font size that is larger than asecond font size used to render a plurality of characters included inthe second section.
 14. The computer program product of claim 10 whereinthe actions further comprise: vertically merging two or more of theplurality of sections by: identifying one of the plurality of sectionsas a selected section and one of the plurality of sections as areference section, wherein the identification is based on the selectedsection including a first directional link to the reference section in afirst vertical direction and the reference section including a seconddirectional link to the selected section in an second verticaldirection, wherein the second vertical direction is opposite from thefirst vertical direction; and merging the selected section and thereference section to form one of the increasingly larger sections; andrepeating the building of the zero or more directional links between theincreasingly larger section formed by the merger of the selected sectionand the reference section with the other sections included in theplurality of sections.
 15. The computer program product of claim 14wherein the actions further comprise: repeatedly performing the verticalmerger of sections until exhaustion of selected and reference sectionswith vertical links is encountered; upon exhaustion of selected andreference sections with vertical links, horizontally merging two or moreof the plurality of sections by: identifying one of the plurality ofsections as a second selected section and one of the plurality ofsections as a second reference section, wherein the identification isbased on the second selected section including a primary directionallink to the reference section in a first horizontal direction and thesecond reference section including a secondary directional link to thesecond selected section in an second horizontal direction, wherein thesecond horizontal direction is opposite from the first horizontaldirection; and merging the second selected section and the secondreference section to form one of the increasingly larger sections; andrepeating the building of the zero or more directional links between theincreasingly larger section formed by the merger of the second selectedsection and the second reference section with the other sectionsincluded in the plurality of sections.
 16. The computer program productof claim 15 wherein the actions further comprise: repeatedly performingthe special merging, the vertical merging, and the horizontal merginguntil the increasingly larger section includes all of the plurality ofsections consolidated into the final large section; inputting the finallarge section to a corpus utilized by a question answering (QA) system;and increasing a natural language processing (NLP) performance of the QAsystem by performing NLP operations on the final large section insteadof the PDF source file.